home *** CD-ROM | disk | FTP | other *** search
- 2-1
-
- The Generic Adventure Game System
- Copyright 1985,1986 by Mark J. Welch 415-845-2430 (voice)
-
- __________________________________
- | |
- | How to write an adventure game: |
- |__________________________________|
-
-
-
- -------------------------------------------------------
- Introduction: Why Should I Write My Own Adventure Game?
- -------------------------------------------------------
-
- If you're asking that question, it's quite possible that you
- shouldn't. But let me suggest a scenario:
-
- - Imagine your office as an adventure game. Imagine the
- wonderful descriptions you could provide for your co-workers'
- offices, the analogies you could make for the delivery people,
- and the thinly-veiled insults of your boss you could include. If
- such an adventure game scenario were written in reasonable taste,
- it could serve as a well-deserved diversion on a Friday
- afternoon. Of course, if it's written in poor taste, and your
- insults aren't veiled enough, it could be your last Friday.
- - Maybe you are trying to teach someone something. Perhaps you
- want them to learn about computers. Maybe you want to guide them
- through many screens of tutorials. If you could write the text as
- an adventure game, and make learning a game -- even fun -- the
- game players might learn more faster.
- - Or maybe you're well-equipped with a great imagination and
- you want to develop a game that will rival the ones you've
- bought in stores or played with friends. Perhaps this is your
- chance to prove your fiction-writing abilities. Who knows what
- adventure lurks in the heart of the computer user?
-
-
-
- 2-2
-
- ---------------------------------------------------------
- How the Adventure Game Works -- A Superficial Explanation
- ---------------------------------------------------------
-
- (This section explains how GAGS does what it does. You might want
- to look at a copy of a .DAT file, such as UNDERGND.DAT, as you
- read this.)
-
-
- A Sequential Account
- --------------------
- As an author, I knew that anyone who developed an adventure game
- using GAGS would want instant credit, so the first thing GAGS
- does is look on the disk for a title file, which should contain
- the name of the game, the author's name, and perhaps a copyright
- statement. Each line in the file is displayed centered on the
- screen.
- Being protective, I also make sure the program posts my
- copyright notice just below the game writer's. If, for some
- reason, there is no file TITLE.DAT, the GAGS copyright
- information is displayed by itself. The title screen, with the
- author's information and mine, stays on the screen while the
- program initializes all its data arrays and records and reads the
- data file.
- The program next reads the datafile (filename.DAT). It
- searches each of its 17 keywords (words like "ROOM," "NOUN," or
- "CREATURE"). When it finds one of these words as the first word
- on a line (ignoring spaces and punctuation), it looks for a
- number so it knows where to store the information that follows.
- It then carefully analyzes each line that follows, updating its
- internal arrays to match the specifications in the text file,
- until it finds a keyword beginning with "END_" (i.e.
- END_CREATURE, END_NOUN, END_ROOM). Note: the game will NOT
- detect a mismatched END_keyword; all it really checks is that the
- the first four letters are "END_".
- Since the file contains both descriptions and data record
- information, it takes a while to scan the whole file: for a 30K
- file with about 65 rooms, it takes fifty seconds. Among other
- things, this gives the player a good chance to read the title
- screen, thus satisfying the game author's conceit and mine.
- If the file contains some text preceded by the keyword INTRO
- and ended with the keyword END_INTRO, that text is displayed as
- it is encountered. It cannot be re-read during the game.
- Once all the data has been read in, the program puts the
- player into room 2 of the game (there is no room 1: a location of
- 1 indicates the player's pockets). GAGS then prints the long text
- description for room 2, (defined by ROOM_DESCR 2...END_ROOM_DESCR)
- and the player is asked what to do.
-
- (continued)
-
- 2-3
-
- (how GAGS works, continued)
-
-
- Each time the player types in a command and <ENTER>, the
- program sends the input line to the "parse" module. The parser
- take the input line, breaks it into separate words, and tries to
- locate a verb, a noun, a preposition, and another noun as the
- object of the preposition. It does this by eliminating extra
- words like "the" and "please"; and by checking and then
- eliminating adjectives. It returns four words: verb, noun,
- preposition, and an object of the preposition. (If any element is
- missing, the "empty string" ('') is returned.)
- If an invalid word is found by the parser, it informs the
- user by suggesting what part of speech it sought and what word it
- didn't recognize. Otherwise, the program then calls the execute
- module; this section selects a procedure to call based on the
- verb (throw, take, eat, move). Depending on the procedure's own
- checking, the noun, preposition and object might be rejected as
- invalid or, in some cases, ignored partly or completely.
-
- If motion is called for, the program checks to see if the
- direction is valid (i.e. if moving EAST was supposed to get the
- player to a new room). If it's valid, the player is moved to the
- new room; if not, the player is informed. Other actions are
- checked in the same way: if a noun is expected, does the player
- have it or is it in the room? If the thing is here, does this
- time, place, and action constitute a special event of some sort?
- If it does, the player is sent off to a "special" procedure;
- otherwise the action is executed and the thing is changed as
- specified, or is described or taken.
-
- There are two ways a player can be moved to a new room. One
- is by specifically trying to do so. Moving east is generally
- accomplished by typing "EAST."
- The other way to move is by meeting a set of special
- requirements that the current game's author has defined as a
- "special." The special might be defined, in plain language, as "if
- the player is in the sauna, and he turns the faucet, then move him
- to another room X." That other room might be anything. One
- possibility is that it may be a room with a similar or identical
- description, but with a new exit or without an old one. It might
- even be the same room, but by executing the "special," the program
- displays several lines of text.
- In this case, the special text might be "You turn on the
- faucet, and scalding hot water pours onto your feet. You scream in
- agony and kick the faucet, which is turned off." If the author was
- cruel, the "special" here might move the player to a new room
- called "hell" and be told "As you turn the faucet, scalding hot
- water pours out onto your legs. You scream in agony, but the faucet
- won't shut off. In minutes, you are scalded to death. You awaken in
- hell, where Satan tells you that your punishment for killing the
- lizard [something the player did earlier to get here] will be
- boiling in oil for eternity." The new room description would
- describe a vat of boiling oil, provide no exits, and include the
- keyword GAME_END to end the game.
-
- (continued)
-
- 2-4
-
- (how GAGS works, continued)
-
-
- "Specials" are the way you do almost anything unusual. Of
- course, a special can be used to move a player to a new room
- (i.e. "touch mirror" might cause the player to fall through the
- looking-glass and into a new room). But specials also allow a
- room to be "changed" in the player's view -- this is accomplished
- by actually moving the player to a new, but similar room. If you
- want an airlock to close one door and open another, you use a
- "special" which moves the player to a 'new' airlock with a
- different exit. If you want a player to 'teleport,' you use a
- special. If you want to player to be surprised by some action but
- not moved (i.e. 'play stereo' could lead to "Beethoven's Fifth
- plays loudly, awakening the neighbors. Someone pounds loudly on
- the ceiling"), use a special.
- There is one problem with using a special to "change" a
- room. If you decide, for example, to have a player move from an
- intact room to a damaged room when s/he decides to "push button,"
- you may have some problems. Suppose the intact room was 13, the
- damaged room was 14, and room 7 was adjacent. The player moves
- east from 7 to 13. S/he pushes the button and is "specialed" to
- room 14. S/he exits west to room 7, since you've provided that
- exit from either room 13 or 14. When s/he moves east from 7,
- however, s/he moves back to room 13, since room 7's pointers
- remain unchanged by the "special." My fix to this is to simply
- not provide reverse pointers: once you've blown up a room, make
- sure the player can't ever trace his/her steps back to the
- undamaged room.
-
- Internally, specials are stored as a direction, and each
- room that has a special has a "key" -- a matching noun. This is
- probably the most complex part of creating an adventure game: you
- need to have some fairly complex linkage in your data file, all
- done manually.
-
-
- 2-5
-
- How GAGS Works: Another Approach
- --------------------------------
-
- GAGS keeps track of three large record arrays internally: the
- rooms, the nouns, and the creatures.
-
- -----
- Rooms
- -----
-
- Each room is a record, with the following fields:
- name (string)
- n,s,e,w,ne,se,sw,nw,u,d,enter,exit,special
- (all integers: what room do they lead to?)
- key (integer - what noun activates the 'special' direction?)
- has_seen (true/false: has the player seen this room yet?)
- locked_door (true/false - is there a locked door here?)
- points (how many points for just getting to this room?)
-
- The room specification in the data file is quite simple:
-
- ROOM <nn>
- <Room Name>
- <direction> <nn>
- .
- .
- .
- <direction> <nn>
- < optional: SPECIAL <nn> and KEY <nn> >
- < optional: POINTS <n> >
- < optional: LIGHT <nn> >
- < optional: GAME_END >
- END_ROOM
-
- A room description must also be provided:
-
- ROOM_DESCR <nn>
- Some text, any number of lines, about the room.
- END_ROOM_DESCR
-
- (Similar formats are used for descriptions of nouns and creatures.)
-
- It is recommended that at a minimum, one exit be provided;
- otherwise the player will be stuck in the room until he quits. Of
- course, that direction might be a special.
-
-
- 2-6
-
- --------
- Specials
- --------
- To 'activate' the special, the player must 'do something' to
- the noun specified as the room's KEY. This can include turning
- it, pushing it, pulling it, or playing it (depending on what can
- be done to the noun as defined). If the proper action is taken on
- the noun while in the room, the player will be relocated to the
- room specified in the SPECIAL line and the SPECIAL nn text will
- be displayed. (If the Special points to the current room, the
- only effect apparent to the reader will be the display of the
- SPECIAL text.)
-
- An example:
-
- --------
-
- ROOM 13
- .
- .
- SPECIAL 13
- KEY 218
- END_ROOM
-
- NOUN 218
- Stereo
- .
- .
- TURNABLE
- PLAYABLE
- END_NOUN
-
- SPECIAL 13
- As you turn on the stereo, you hear a song by "Duran Duran." The
- stereo turns itself off when the song is finished.
- END_SPECIAL
-
- -----------
-
- Defaults: The default for almost all integer values is zero:
- thus, any direction not specified will be set to zero (no room),
- including 'special' and the key noun pointer, unless the data
- file specifies differently.
-
-
- 2-7
-
- -----
- Nouns
- -----
-
- Nouns are necessarily more complex. They are specified in the
- following format, listed with the possible values (and defaults)
-
- NOUN <nn>
- <name> - must appear on second line, must be one word (underscores
- permitted)
- <adjective> - must appear on 3rd line - a one-word adjective (or 'NO_ADJ')
- <short> - must appear on 4th line - one line of text describing the noun
- (the remaining words and phrases may appear in any order or may be
- omitted to obtain the default values)
- WEIGHT <nn> - 1 to 100+ (default=1)
- SIZE <nn> - 1 to 100+ (default=1)
- LOCATION <nn> - initial location (room number, another noun, or the
- player) (1=player) (default = 0)
- READABLE - default is 'not readable'
- CLOSABLE - default is 'not closable'
- CLOSED - default is 'open'
- ON - default is 'off'
- PUSHABLE - default is 'not pushable' - activates special!
- TURNABLE - default is 'not turnble' - activates special!
- PLAYABLE - default is 'not playable' - activates special!
- LOCKABLE - default is 'not lockable'
- LOCKED - default is 'unlocked'
- KEY <nn> - default is 0 (what noun is used to unlock this noun?)
- POISONOUS - default is 'nonpoisonous'
- EDIBLE - default is 'inedible'
- DRINKABLE - default is 'undrinkable'
- UNMOVABLE - default is 'movable' (can be TAKEn)
- POINTS <nn> - default is 0 -- how many points if carried?
- IS_LIGHT - default is 'false'
- END_NOUN - this word must appear alone on a line!
-
- Note: To 'spice' up the game, you might want to put things inside
- other things initially, so the player has to open everything to
- be sure s/he doesn't miss anything important. Be logical, though:
- a refrigerator seems likely to be open-able, but a crabapple
- probably ought to be 'closed' and 'unclosable' and thus unable to
- contain something else (unless you're into razor blades...).
-
-
- 2-8
-
- ----
- TEXT
- ----
- Things that can be "read" are perhaps best described as
- "special specials." Rather than using the "SPECIAL" function,
- readable objects use "TEXT." Thus, the following would be a
- valid set of definitions:
-
- --------
-
- NOUN 232
- Book
- Red
- There is a small red book here.
- WEIGHT 1
- SIZE 3
- LOCATION 32
- READABLE
- END_NOUN
-
- NOUN_DESCR 232
- The red book is quite thin, and has a hard cover. There is
- writing on the book.
- END_NOUN_DESCR
-
- TEXT 232
- The title of the book is "The Wisdom of Ronald Reagan."
- The pages are all blank.
- END_TEXT
-
-
-
- ----------
- PUSH_DESCR
- PULL_DESCR
- TURN_DESCR
- PLAY_DESCR
- ----------
- If a noun is described as being pushable, playable, turnable, or
- pullable, you can define a response to the player taking those
- actions. This description will be displayed only if the player
- takes the specified action AND that action does not activate a
- SPECIAL for the current room. If there is no description
- provided, a standard ("nothing happens") message is provided.
-
-
- 2-9
-
- ---------
- Creatures
- ---------
-
- Creatures, like rooms, are relatively simple. Any living thing is
- identified as a 'creature', and can be either 'friendly' or
- 'hostile'.
-
- CREATURE <nn>
- <name>
- <adjective>
- <short descriptive line of text>
- LOCATION <nn> - default := 0
- WEAPON <nn> - what noun kills it? (default := 0)
- HOSTILE - (default is FRIENDLY)
- END_CREATURE - must be the only thing on the line!
-
- Friendly creatures are quite passive; hostile creatures are not
- quite as friendly. It is recommended that provisions be made for
- a weapon to kill any hostile creatures. For fairness, that weapon
- should be accessible by the player BEFORE s/he meets the hostile
- creature.
- Players should be discouraged from wild and unwarranted
- killing: i.e. they ought not kill friendly creatures. If no
- weapon will kill the creature (i.e. if you leave or specify
- WEAPON as the default value 0), the player cannot kill it. For
- friendly creatures, you should not lead the player on by making
- the weapon something unexpected: if the player kindly offers a
- jelly bean to the friendly creature, it ought not be fatal. On the
- other had, using a poisoned jelly bean to kill the Reagan_Beast
- might be both appropriate and challenging. Only one weapon can
- kill any given creature, but the same weapon might be used to kill
- many creatures.
-
- ---------
-
-
-
- 2-10
-
- Some last-minute notes:
-
-
- Order of definitions:
- Note: GAGS doesn't require that the definitions be in a
- specific order. Definitions can be freely mixed throughout your
- data files. You'll probably want to group items together that
- logically belong together; that's how I wrote the sample game.
- The order of definitions in the file has NO effect on game
- performance, as long as each definition is properly structured.
- If you write 'INTRO' text for the game, it's best to put that
- text at the end of the data file; that way the initialization
- will be done when the player finishes reading the introduction.
- (If the INTRO text is at the top of the file, GAGS must read the
- rest of the data file after the player has read the
- introduction, causing a more noticable and worrisome delay.)
-
-
- Word Processors:
- Note: I used PC-Write to create the sample adventure file. You
- MUST use a word processor which creates plain ASCII/DOS text
- files with a true carriage return at the end of each line. Lines
- longer than 80 characters, and WordStar document files, will
- cause GAGS to gag! (For information on obtaining PC-Write, see
- appendix D -- "Other Shareware.")
-
- Value Ranges for Game Definitions:
- Note: The following are the valid ranges of numbers for nouns,
- rooms, and creatures. DO NOT assign improper numbers to any
- category, or you will experience unpredictable (but consistently
- erroneous) results.
- Player: 1
- ROOMS: 2 to 199
- NOUNS: 201 to 299
- CREATURES: 301 to 399
-
- Note: The GameWriter Diagnostics Mode
-
- GAGS has a "diagnostics" mode which should be somewhat
- helpful as you develop games. By adding /d to the DOS command
- line that invokes GAGS, you'll be able to see exactly what the
- game is doing during initialization. If you compare a paper copy
- of your .DAT file to the diagnostics screen output, you'll be
- able to see exactly when and if the system encounters any
- problems with your file. The diagnostics mode is specifically
- designed to let you graphically see if any "END_" statements are
- missing. It is not a very powerful debugging tool, but it takes
- much of the guesswork out of the system.
-
- (continued)
-
- 2-11
-
- (Last-minute notes, continued)
-
-
- Light and Darkness:
- If a room has a LIGHT value other than 0 (the default), the
- room will appear pitch black if the player wanders in empty-
- handed. There are two "types" of lights and two types of
- darkness. A noun may be defined as being a light by specifying
- the word IS_LIGHT in its definition; in this case, it will light
- any dark room defined as LIGHT 1. The light value of 1 in a room
- definition means that any light will make the room visible. Of
- course, these "general-purpose" lights must be turned on to light
- the room, and thus all LIGHTs can be TURNed ON and OFF (or
- LIGHTed and EXTINGUISHed.). (EXT is an acceptable abbreviation
- for EXTINGUISH; EX is the abbreviation for EXAMINE.)
- If the LIGHT value is more than 1 (i.e. LIGHT 218), only the
- noun with the matching number will make the room's contents
- visible. This is useful if the darkness comes from something
- other than an absence of light: for example, a fan might be the
- only object that makes a smoky room clear enough to see in.
- A special-purpose light need not be defined as a light (i.e. it
- doesn't have to be defined IS_LIGHT), nor does it have to be on,
- to work as a light in a room with that noun as a LIGHT. A
- noun can function as a special-purpose light for more than one
- room, but each room can only be lit by one special-purpose light.
- (A room with a LIGHT value of 1 will be lit by ANY noun defined
- as IS_LIGHT.)
-
-
- -----------
-
- Note: Command abbreviations
-
- Some command abbreviations have been implemented:
-
- . = examine (i.e. ". bar")
- ! = attack (i.e. "! wolf")
- ex = examine
- ext = extinguish (turn off)
-
-
-
- 2-12
-
- Creating a typical room:
- ------------------------
-
- Let's suppose that my game contains a bedroom, connected to a
- closet, a bathroom, and a hallway. In the bedroom are a lamp, a
- bed, a dresser, a mirror, and a werewolf.
-
- First, I want to define the room itself:
-
-
- ===============================================
- ROOM 34
- Master Bedroom
- WEST 33 (33 is the hallway)
- EAST 35 (35 is the bathroom)
- NORTHEAST 36 (36 is the closet)
- END_ROOM
- ===============================================
-
- A description of the room is appropriate here:
-
- ===============================================
- ROOM_DESCR 34
- This is the master bedroom, where Mommy and Daddy usually sleep.
- Plainly visible in the room are a bed, a dresser, a lamp, and a
- large wall mirror. The room smells horrible, as if a large,
- unclean animal had been here recently.
- END_ROOM_DESCR
- ===============================================
-
- Note that this description mentions the nouns that are
- initially in the room. This is OK, since all of the nouns are
- UNMOVABLE, but if they could be taken by the player, they should
- not be described in the room description since they won't be
- there if the player should return.
-
- That werewolf is begging to be described, too:
-
-
- ===============================================
- CREATURE 315
- Werewolf
- Black
- There is a menacing black werewolf here.
- LOCATION 34
- WEAPON 217 <-- Noun 217 will kill it
- HOSTILE <-- ever met a friendly werewolf?
- END_CREATURE
- ===============================================
-
- ===============================================
- CREATURE_DESCR 315
- The werewolf is about the size of a small horse. Its matted fur
- stinks, and a sickening smell emerges from its open mouth,
- through which you can see sharp, large teeth.
- END_CREATURE_DESCR
- ===============================================
-
- 2-13
-
- Finally, each noun within the room ought to be defined and
- described:
-
- ===============================================
- NOUN 220
- Bed
- Large
- There is a large (king-size) bed here.
- LOCATION 34
- UNMOVABLE
- END_NOUN
- ===============================================
- NOUN_DESCR 220
- The bed is quite ordinary.
- END_NOUN_DESCR
- ===============================================
- NOUN 221
- Dresser
- Wooden
- There is a large wooden dresser here.
- LOCATION 34
- CLOSABLE
- CLOSED
- UNMOVABLE
- END_NOUN
- ===============================================
- NOUN_DESCR 221
- The wooden dresser looks pretty much like most wooden dressers.
- END_NOUN_DESCR
- ===============================================
- NOUN 222
- Lamp
- Small
- There is a lamp on the dresser.
- LOCATION 34
- UNMOVABLE
- END_NOUN
- ===============================================
- NOUN_DESCR 222
- The small table lamp is pink and has a green shade.
- END_NOUN_DESCR
- ===============================================
- NOUN 223
- Mirror
- Strange
- There is a wall-size mirror here.
- LOCATION 34
- UNMOVABLE
- END_NOUN
- ===============================================
- NOUN_DESCR 223
- As you gaze into the mirror, you sense something unusual about
- it. It seems to shimmer, and your reflection seems somehow
- unreal, as if the mirror weren't really there at all.
- END_NOUN_DESCR
- ===============================================
-
- 2-14
-
- Hmm. That mirror seems rather interesting. Maybe we could make
- a "special" out of it. For example: when the player touches it,
- s/he is sent to room 50, the mystic cavern of the Wizardess.
- To do so, we need to add a "special" to room 34 and specify the
- mirror as its key, and we need to make the mirror touchable.
- (Note: "touch" and "push" are synonyms -- you should use the
- word "push," not the word "touch," in your definitions.)
-
- ===============================================
- ROOM 34
- Master Bedroom
- WEST 33 (33 is the hallway)
- EAST 35 (35 is the bathroom)
- NORTHEAST 36 (36 is the closet)
- SPECIAL 50 <--
- KEY 223 <--
- END_ROOM
- ===============================================
-
- ===============================================
- NOUN 223
- Mirror
- Strange
- There is a wall-size mirror here.
- LOCATION 34
- UNMOVABLE
- PUSHABLE <-- Here's how we'll activate the special
- END_NOUN
- ===============================================
-
-
- The player will see room 50's description when s/he gets
- there, but the SPECIAL text for room 50 will be displayed first:
-
-
- ===============================================
- SPECIAL 50
- You reach out to touch the mirror, and are shocked to find that
- your fingers vanish through the surface. Before you can react,
- you feel yourself drawn forward through the mirror, and into a
- black nothingness. You look back to try to see the mirror, but
- everything is black.
- You are falling, but not very quickly -- it's almost as if you
- are floating. As you fall, your eyes begin to adjust to the
- darkness. Then, suddenly, you land on a soft cushion of some
- sort. As you rest on the cushion, your eyes adjust to the very
- dim light of this new room.
- END_SPECIAL
- ===============================================
-
- (Note that usually, you'd want to have a PUSH_DESCR prepared
- for when the player touches a noun when it doesn't activate a
- special, but the mirror can't be moved so it will always
- activate a special when touched.)
-
-
- 2-15
-
- How to include Comments:
- ------------------------
-
- Within your data file, you'll probably want to include
- comments which won't be processed by the game itself, so you'll
- be able to understand why you did certain things.
-
- In general, GAGS treats anything it doesn't understand as a
- comment. Thus, if you have a paragraph of text in between
- definitions, GAGS will usually ignore it.
- BEWARE: If one of the lines in the paragraph begins with a
- keyword like "noun" or "text," GAGS will probably decide that
- it's the beginning of a definition and get confused.
- To avoid this, you can use a nonsense word to start each line
- of a comment: words like "REM" (for remark) are useful since they
- also clearly state what the line is.
- Gags ignores most punctuation completely, so using "comment"
- indicators like "(*" and "*)" or { and } won't help anything.
- GAGS usually only sees alphabetic characters ('a'..'z' and
- 'A'..'Z').
- You can put comments on lines which contain a keyword or a
- keyword and a number; don't include comments on lines which
- contain a full-line description.
-
- Example of properly-commented definitions:
-
- ===============================================
- ROOM 34
- Master Bedroom
- WEST 33 (33 is the hallway)
- EAST 35 (35 is the bathroom)
- NORTHEAST 36 (36 is the closet)
- SPECIAL 50 <-- Special goes to room 50 (cavern)
- KEY 223 <-- Spec.activated by touching mirror
- END_ROOM
- ===============================================
-
- ===============================================
- NOUN 223
- Mirror
- Strange (isn't there a better adjective?)
- There is a wall-size mirror here.
- LOCATION 34 (in the Master Bedroom)
- rem: the player finds this mirror in the master bedroom,
- rem: and gets to the Cavern by touching it. The player
- rem: can only return if s/he has the magic amulet, and
- rem: will need the soap from the bathroom to kill the
- rem: demon on the bridge.
- UNMOVABLE (not very useful if the player can take it!)
- PUSHABLE <-- Here's how we'll activate the special
- END_NOUN
- ===============================================
-
- 2-16
-
-
- Example of a badly-commented definition:
-
- ===============================================
- ROOM 34
- Master Bedroom
- WEST 33 (33 is the hallway)
- (If the player decides to enter the bathroom to the
- west, s/he will find the 32 gold pieces.)
- EAST 35 (35 is the bathroom)
- NORTHEAST 36 (36 is the closet)
- SPECIAL 50 <-- Special goes to room 50 (cavern)
- KEY 223 <-- Spec.activated by touching mirror
- (The player gets to the mystic cavern by means of a
- key special, activated by noun 233)
- END_ROOM
- ===============================================
-
- In the above example, the second full comment line begins with
- the keyword "WEST" and contains the number 32, so GAGS might
- decide that WEST should lead to room 32, changing the game! The
- last line before the END_ROOM could confuse GAGS and redefine the
- key number (probably to zero).
-
-
-
-
-
- 2-17
-
- Verb synonyms:
- To make up for a lack of extended vocabulary in GAGS, version
- 1.06 includes a new feature allowing you to declare new verbs as
- synonyms of old verbs. The main restriction is that only one new
- verb may be matched to each old verb. The new verb will simply be
- translated by GAGS' parser, so error messages will refer to the
- verb GAGS knows, not the verb the player types.
- To redefine verbs, simply create a GAGS definition starting with
- VERB (alone on a line) and ending END_VERB (alone on a line). For
- example:
-
- VERB
- KILL STAB
- ATTACK STRANGLE
- UP CLIMB
- END_VERB
-
- In the above example, if the player types "Stab the dwarf with the
- knife," GAGS will translate the sentence to "Kill the dwarf with
- the knife" and attempt to do so. Likewise, if the player types
- "climb" the game will execute the sentence as if the player had
- typed "up" -- which means that "climb down" would be translated to
- "up down" which would, of course, confuse the game somewhat and
- generate an error message which might, in turn, confuse the player.
- Because the verb synonyms are not actually user-defined verbs,
- you should think carefully about the possible uses of words you
- add, to make sure the player won't be confused by the meaning of a
- word. You may only provide synonyms for verbs; you may not provide
- synonyms for nouns, adjectives, creatures, or phrases.
- Again, a verb may have only one synonym. The following entry
- would generate an error message in diagnostics mode and would have
- unpredictable results in standard game-playing mode.
-
- VERB
- ATTACK ASSAULT
- KILL STRANGLE
- ATTACK KICK <-- duplicate synonym for 'attack'
- END_VERB
-
-
- Warning Number One: It is NOT possible to define a synonym for a
- synonym. For example, the following entry would generate an error
- message:
-
- VERB
- ATTACK CHOKE
- CHOKE STRANGLE <-- "Verb not recognized - Line ignored"
- END_VERB
-
-
- Warning Number Two: You MAY re-define an existing verb, i.e.
-
- VERB
- ATTACK PUSH
- END_VERB
-
-
-
- 2-18
-
-
- But this will disable the normal meaning for "PUSH." In this case,
- the same function is available through an alternate verb ("TOUCH")
- so the effect is not too drastic. It is possible to re-map verbs
- this way, i.e.
-
- VERB
- EAST TURN
- TURN TWIST
- END_VERB
-
- (In this case, the user can access the function normally provided
- by "turn" by typing "twist," but any use of the word "turn" will
- have the effect usually obtained by typing "east.")
- As you can see, it's quite possible to confuse the heck out of
- people by re-mapping verbs extensively. It is also quite possible
- to create nonsense verbs that seem like specials. For example, you
- could map out (essentially disable) a verb and map a new verb to
- it, thus using the new verb to have the same effect as an old verb,
- as in the twist/turn example above. You might try mapping out
- directions, although you will have trouble finding enough uncommon
- verbs to map the disabled directions to, and then provide "magic"
- words that take the player in those "directions."
- Please note that verb synonyms add a very powerful feature but
- are still quite limited. Use them very carefully.
-
- =======================
-
- Creature Time Threshholds:
- Some gamewriters wanted more aggressive monsters -- and even
- monsters who would kill the player instantly. For them, I've added
- a new keyword to creatures: TIME_THRESH. A previous keyword,
- THRESHHOLD, determines how many times the player may unsuccessfully
- attack the creature before the creature rips the player to pieces.
- In contrast, TIME_THRESH determines how many turns the player can
- be in the same room with the creature before being killed. While a
- player could previously spend dozens of turns examining objects and
- reading scrolls without TIME_THRESH, s/he now must kill the
- creature before that time interval expires. A subtle warning ("The
- <creature> seems to be getting angrier") appears as the player approaches
- that threshhold.
- To avoid compatibility problems with earlier versions of GAGS,
- the default value of TIME_THRESH is -1, which disables it. The
- default value of THRESHHOLD is 3.
-
- ===============================================
- CREATURE 315
- Werewolf
- Black
- There is a menacing black werewolf here.
- LOCATION 34
- WEAPON 217 <-- Noun 217 will kill it
- HOSTILE <-- ever met a friendly werewolf?
- THRESHHOLD 3 <-- (default)
- TIME_THRESH 10 <-- 10 turns to kill it
- END_CREATURE
- ===============================================
-
-
-
-
- 2-19
-
-
- GAME_WIN
-
- Oops. I didn't realize that there was no way to win a GAGS game
- before. At one point, I thought that acquiring all the points
- defined in the game would cause the player to win, but that wasn't
- the case. After careful consideration and several complaints, I
- have added a GAME_WIN option to rooms. If you define a room as
- GAME_WIN, then the player wins the game upon entering the room,
- and the game ends then.
- The room description is displayed, so you should put your
- congratulatory description there.
-
-
- ROOM 34
- Master Bedroom
- WEST 33 (33 is the hallway)
- EAST 35 (35 is the bathroom)
- NORTHEAST 36 (36 is the closet)
- SPECIAL 50 <-- Special goes to room 50 (cavern)
- KEY 223 <-- Spec.activated by touching mirror
- GAME_WIN
- END_ROOM
-
- -30-
-
-
-
- _____________________________________________________________
- | |
- | The Generic Adventure Game System, in all source code and |
- | object code formats, and all related documents, are copy- |
- | right 1985,1986 by Mark Welch. The Generic Adventure Game |
- | System is distributed as Shareware, with restrictions as |
- | specified in the documentation. Commericial use without |
- | prior written permission is prohibited. |
- | GAGS is distributed as Shareware: if you like the |
- | program, please become a registered user by sending $15 |
- | to the author: Mark J. Welch |
- | P.O. Box 2049 |
- | San Francisco, CA 94126-2409 |
- | 415-845-2430 (voice) |
- | Fido 125/459 (private BBS node) |
- |_____________________________________________________________|
-
-
-